package com.ttt.adbgui.controller;

import com.ttt.adbgui.gui.GUIHome;
import com.ttt.adbgui.jcomp.JFrameComponent;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.swing.*;

@Component
public class StartMain {

    @Autowired
    private GUIHome guiHome;
    @Autowired
    private JFrameComponent jFrameComponent;

    public void start(){

        JFrame jFrame = jFrameComponent.getJFrame();

        // 允许设置给jframe设置皮肤
        jFrame.setDefaultLookAndFeelDecorated(true);
        try { UIManager.setLookAndFeel("ch.randelshofer.quaqua.QuaquaLookAndFeel"); }
        catch (Exception e) { throw new RuntimeException(e); }
        // 绘制主界面
        guiHome.publicComponent();
    }
}
